
import time
from task.base.baseApi import  Base
import task.pageObject
import allure

class PageAddr(Base):

    @allure.step('填写姓名')
    def add_name(self):
        self.base_input(task.pageObject.loc_add_name,task.pageObject.value_add_name)

    @allure.step('填写电话号码')
    def add_tel(self):
        self.base_input(task.pageObject.loc_add_tel,task.pageObject.value_add_tel)

    @allure.step('选择地址')
    def add_addr(self):
        self.base_select(task.pageObject.js_add_pro,task.pageObject.loc_add_pro,task.pageObject.text_add_pro)
        time.sleep(2)

        self.base_select(task.pageObject.js_add_city,task.pageObject.loc_add_city,task.pageObject.text_add_city)
        time.sleep(2)

        self.base_select(task.pageObject.js_add_country,task.pageObject.loc_add_country,task.pageObject.text_add_country)
        time.sleep(2)

        self.base_input(task.pageObject.loc_add_addr,task.pageObject.value_add_addr)

    @allure.step('填写曾用名')
    def add_alias(self):
        self.base_input(task.pageObject.loc_add_alias,task.pageObject.value_add_alias)

    @allure.step('点击保存')
    def save(self):
        self.base_click(task.pageObject.loc_add_save)
        time.sleep(4)





